package com.ysd.lis.entity.bac;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ysd.lis.entity.BaseEntityJpa;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * <p>
 *
 * </p>
 *
 * @author cfz
 * @since 2024-03-21
 */
@Entity
@Table(name = "BAC_RPTRESULT")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "BAC_RPTRESULT", autoResultMap = true)
public class BacTestResult extends BaseEntityJpa {

    private static final long serialVersionUID = 1L;

    /**
     * 检验日期
     */
    @Column(name = "SAMPLEDA")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField("SAMPLEDA")
    private Timestamp sampleda;

    /**
     * 报告单元
     */
    @Column(name = "RPT_GROUP")
    @TableField("RPT_GROUP")
    private String rptGroup;

    /**
     * 标本号
     */
    @Column(name = "SAMPLE_NO")
    @TableField("SAMPLE_NO")
    private String sampleNo;


    /**
     * 细菌分离编号
     */
    @Column(name = "ISOLATE_NUM")
    @TableField("ISOLATE_NUM")
    private String isolateNum;

    @Column(name = "TEST_FLOW_NO")
    @TableField("TEST_FLOW_NO")
    private String testFlowNo;

    @Column(name = "TEST_NODE_NO")
    @TableField("TEST_NODE_NO")
    private String testNodeNo;

    /**
     * 培养基编号
     */
    @Column(name = "CUL_MEDIUM_NO")
    @TableField("CUL_MEDIUM_NO")
    private String culMediumNo;

    /**
     * 感染部位编号
     */
    @Column(name = "INFECT_SITE_NO")
    @TableField("INFECT_SITE_NO")
    private String infeSiteNo;

    /**
     * 感染部位名称
     */
    @Column(name = "INFECT_SITE_NA")
    @TableField("INFECT_SITE_NA")
    private String infeSiteNa;

    /**
     * 微生物编号
     */
    @Column(name = "GERM_NO")
    @TableField("GERM_NO")
    private String germNo;

    /**
     * 微生物名称
     */
    @Column(name = "GERM_NA")
    @TableField("GERM_NA")
    private String germNa;

    /**
     * 检测结果
     */
    @Column(name = "TEST_RESULT")
    @TableField("TEST_RESULT")
    private String testResult;


    /**
     * 耐药表型编号
     */
    @Column(name = "RES_PHENOTYPE_NO")
    @TableField("RES_PHENOTYPE_NO")
    private String resiPhenNo;

    /**
     * 耐药表型名称
     */
    @Column(name = "RES_PHENOTYPE_NA")
    @TableField("RES_PHENOTYPE_NA")
    private String resiPhenNa;

    /**
     * 尿细菌计数
     */
    @Column(name = "COL_COUNT_NO")
    @TableField("COL_COUNT_NO")
    private String urinColoCount;

    /**
     * 结果描述
     */
    @Column(name = "DESC_TEXT")
    @TableField("DESC_TEXT")
    private String descText;


    /**
     * 操作日期
     */
    @Column(name = "OPERATE_DATE")
    @TableField("OPERATE_DATE")
    private Timestamp operateDate;

    /**
     * 操作人编号
     */
    @Column(name = "OPERATE_USER_NO")
    @TableField("OPERATE_USER_NO")
    private String operateUserNo;

    /**
     * 报告项目编号
     */
    @Column(name = "ITEM_NO")
    @TableField("ITEM_NO")
    private String itemDictNo;

    /**
     * 备注1
     */
    @Column(name = "REMARK1")
    @TableField("REMARK1")
    private String remark1;

    /**
     * 备注2
     */
    @Column(name = "REMARK2")
    @TableField("REMARK2")
    private String remark2;

    /**
     * 备注3
     */
    @Column(name = "REMARK3")
    @TableField("REMARK3")
    private String remark3;

    /**
     * 备注4
     */
    @Column(name = "REMARK4")
    @TableField("REMARK4")
    private String remark4;


    /**
     * 菌群比率
     */
    @Column(name = "BAC_RATE")
    @TableField("BAC_RATE")
    private Double bacRate;

    /**
     * 是否危急值 0是1否
     */
    @Column(name = "IS_ALARM")
    @TableField("IS_ALARM")
    private Boolean isAlarm;

    /**
     * 危急值信息
     */
    @Column(name = "ALARM_TEXT")
    @TableField("ALARM_TEXT")
    private String alarmText;

    /**
     * 是否药敏危急值 0是1否
     */
    @Column(name = "IS_DRUG_ALARM")
    @TableField("IS_DRUG_ALARM")
    private Boolean isDrugAlarm;

    /**
     * 药敏危急值信息
     */
    @Column(name = "DRUG_ALARM_TEXT")
    @TableField("DRUG_ALARM_TEXT")
    private String drugAlarmText;

    /**
     * 是否传染病 0是1否
     */
    @Column(name = "IS_CONTAGION")
    @TableField("IS_CONTAGION")
    private Boolean isContagion;


    /**
     * 仪器结果id
     */
    @Column(name = "INT_RESULT_ID")
    @TableField("INT_RESULT_ID")
    private String intResultId;


    /**
     * 发布级别    如：0未发布、1已发布
     */
    @TableField("BAC_PUBLISH_STATUS")
    @Column(name = "BAC_PUBLISH_STATUS")
    private BigDecimal bacPublishStatus;

    /**
     * 菌株号
     */
    @Column(name = "STRAIN_NO")
    @TableField("STRAIN_NO")
    private String strainNo;

    /**
     * 仪器编号
     */
    @Column(name = "INSTR_CODE")
    @TableField("INSTR_CODE")
    private String instrCode;

    /**
     * 仪器组编号
     */
    @Column(name = "GERM_MACHINE_NO")
    @TableField("GERM_MACHINE_NO")
    private String germMachineNo;




    /**
     * 病历号
     */
    @Transient
    @TableField(exist = false)
    private String patNo;

    /**
     * 检验目的
     */
    @Transient
    @TableField(exist = false)
    private String testPurpose;

    /**
     * 检验目的
     */
    @Transient
    @TableField(exist = false)
    private String reqPurpose;

    /**
     * 标本类型
     */
    @Transient
    @TableField(exist = false)
    private String traits;

    /**
     * 标本类型
     */
    @Transient
    @TableField(exist = false)
    private String sampleType;

    /**
     * 审核医生编号
     */
    @Transient
    @TableField(exist = false)
    private String chkDoctor;

    /**
     * 审核时间
     */
    @Transient
    @TableField(exist = false)
    private Timestamp chkTime;

    /**
     * 是否审核    如：0未审核、1初审、2审核，保存的是0，1，2 stateNa
     */
    @TableField(exist = false)
    @Transient
    private BigDecimal isChk;

    @Transient
    @TableField(exist = false)
    private String val1;

    @Transient
    @TableField(exist = false)
    private String val2;

    @Transient
    @TableField(exist = false)
    private String val3;

    @Transient
    @TableField(exist = false)
    private String sampleTypeName;

    @Transient
    @TableField(exist = false)
    private String deptName;

    @Transient
    @TableField(exist = false)
    private String cultical3Id;

    @Transient
    @TableField(exist = false)
    private String cultical4Id;
    /*采样部位，细菌耐药率，检出率等统计时要用该字段进行分组，去重*/
    @Transient
    @TableField(exist = false)
    private String samplingSite;

}
